#include<stdio.h>
#include<math.h>
int main(){
    for (int sum = 1; sum < 50; )
    { 
        char card1[4],card2[4],card3[4],numberA[4];
        int number1,number2,number3,A1,A2,A3; 
        printf("Please enter three card you draw.And if you long to quit the game,please enter three 0.\n");
        scanf("%2s %2s %2s",card1,card2,card3);
        switch (card1[0])
        {
            case 'k':
            case 'K':
            case 'q':
            case 'Q':
            case 'j':
            case 'J':
            number1=10;
            break;
            case 'a':
            case 'A':
            number1=1;
            break;
            default:
            number1=atof(card1);
        }
        switch (card2[0])
        {
            case 'k':
            case 'K':
            case 'q':
            case 'Q':
            case 'j':
            case 'J':
            number2=10;
            break;
            case 'a':
            case 'A':
            number2=1;
            break;
            default:
            number2=atof(card2);
        }
        switch (card3[0])
        {
            case 'k':
            case 'K':
            case 'q':
            case 'Q':
            case 'j':
            case 'J':
            number3=10;
            break;
            case 'a':
            case 'A':
            number3=1;
            break;
            default:
            number3=atof(card3);
        }
        sum=number1 + number2 + number3;



        if(sum<=11){
            if(number1==1 || number3==1 || number2==1){
                sum+=10;
            }
        }

        
        if (sum > 21)
        {
            printf("Defeat %d\n",sum);
        }
        else
        {
            printf("Vctory %d\n",sum);
        }
        if (sum == 0)
        {
            break;
        }
    
    }
    return 0;
}